home *** CD-ROM | disk | FTP | other *** search
- class classes.fx.ExploD
- {
- var id;
- var x;
- var y;
- var scale;
- var a;
- var clip;
- var Name = "exploD";
- function ExploD(px, py, pscale, pa, pid)
- {
- this.id = pid;
- this.x = px;
- this.y = py;
- this.scale = pscale;
- this.a = pa + 15;
- _root.d = _root.d + 1;
- this.clip = _root.attachMovie("exploD","exploD" + this.id + "Clip",_root.d + 83000);
- this.clip._x = this.x;
- this.clip._y = this.y;
- this.clip._xscale = this.scale;
- this.clip._yscale = this.scale;
- this.clip._alpha = this.a;
- }
- function main()
- {
- if(random(5) == 0)
- {
- if(this.clip.hitTest(_root[_root.char + "Clip"]))
- {
- _root[_root.char].nudge(_root.randRange(-9,9),_root.randRange(-9,9),this.scale - _root.randRange(10,40));
- }
- }
- if(this.clip.end)
- {
- _root.removeFX("exploD" + this.id);
- }
- }
- }
-